//
//  SortNavigation.h
//  Remind
//
//  Created by mac on 17/9/29.
//  Copyright © 2017年 2017.09.27. All rights reserved.
//

#import <UIKit/UIKit.h>
@protocol SortNavigationDelegate <NSObject>
- (void)selectButtonAtIndex:(NSInteger)index;
@end

typedef void(^ClickBlock)(NSInteger idx);
@interface SortNavigation : UIView
@property (weak, nonatomic) id<SortNavigationDelegate> delegate;
@property (strong, nonatomic) ClickBlock clickBlock;
@property (strong, nonatomic) UIScrollView *mainScrollView;
@property (assign, nonatomic) NSInteger currIDX;
@property (strong, nonatomic) UIView *moveLine;
@property (strong, nonatomic) UIView *bottomLine;

- (instancetype)initWithFrame:(CGRect)frame Titles:(NSArray<NSString *> *)titles DefaultIndex:(NSInteger)idx;

//初始化后调用这个方法自定义按钮的颜色
- (void)setButtonBackgroundColor:(UIColor * __nonnull)bgColor SelectBGColor:(UIColor * __nonnull)sBGColor TitleColor:(UIColor * __nonnull)tColor SelectTitleColor:(UIColor * __nonnull)sTColor;

- (void)setScrollViewOffsetXByIndex:(NSInteger)idx;
@end
